﻿namespace Journey.Security
{
    using System.Collections.Generic;
    using System.Linq;

    /// <summary>
    /// 匿名用户。
    /// </summary>
    public sealed class AnonymousUser : UserBase
    {
        /// <summary>
        /// 初始化匿名用户。
        /// </summary>
        public AnonymousUser(params Role[] roles)
        {
            this.Name = "游客";
            this.Email = string.Empty;
            this.Image = string.Empty;
            this.Roles = roles != null ? roles.ToList() : new List<Role>();
        }

        /// <summary>
        /// 头像。
        /// </summary>
        public string Image { get; private set; }

        /// <summary>
        /// 是否可用。
        /// </summary>
        public override bool Disable
        {
            get { return true; }
        }
    }
}